//
//  UIViewController+nav.h
//  FlashFishRec
//
//  Created by LWF on 2018/3/20.
//  Copyright © 2018年 zhangcong. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (nav)

/**    获取同一导航控制器下，当前控制器的上一个控制器     */
- (UIViewController *)previousVC;

/**    获取同一导航控制器下，指定控制器的上一个控制器     */
- (UIViewController *)previousViewControllerForVC:(UIViewController *)vc;

@end


@interface NSObject (UIViewController)

+ (UIViewController *)currentVC;
- (UIViewController *)currentVC;

+ (UINavigationController *)currentNavVC;
- (UINavigationController *)currentNavVC;

- (void)dismissCurrentVCAnimated:(BOOL)animated;
+ (void)dismissCurrentVCAnimated:(BOOL)animated;

@end
